.page-container,
.container {
    padding-bottom: 0rpx !important;
    box-sizing: border-box;
}

.container {
    background-color: #F2F3F8;

    .back-btn {
        position: fixed;
        top: 100rpx;
        left: 30rpx;
        z-index: 120;
    }

    .bg-container {
        position: relative;
        height: 500rpx;
        width: 100%;
        overflow: hidden;

        .bg-image {
            width: 100%;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;
            z-index: 1;
        }

        .bg-overlay {
            display: flex;
            align-items: center;
            justify-content: center;
            position: absolute;
            top: 310rpx;
            right: 18rpx;
            width: 184rpx;
            height: 52rpx;
            background: #000000;
            border-radius: 26rpx;
            opacity: 0.4;
            font-family: Source Han Sans CN;
            font-weight: 400;
            font-size: 26rpx;
            color: #FFFFFF;
            text-align: center;
            line-height: 52rpx;
            z-index: 10;
        }

        .change-bg-btn {
            position: absolute;
            top: 20rpx;
            right: 20rpx;
            color: #FFFFFF;
            font-size: 24rpx;
            z-index: 3;
            background: rgba(0, 0, 0, 0.3);
            padding: 8rpx 16rpx;
            border-radius: 20rpx;
        }
    }

    /* 背景弹窗样式 */
    .custom-popup {
        padding: 50rpx 40rpx;
        background-color: #fff;
        border-radius: 35rpx 35rpx 0rpx 0rpx;

        .popup-title {
            font-weight: bold;
            font-size: 32rpx;
            color: #0E1C37;
            margin-bottom: 50rpx;
            margin-top: 15rpx;
        }

        .popup-btn {
            background-color: #BEFF32;
            font-weight: 500;
            font-size: 32rpx;
            color: #0E1C37;
            text-align: center;
            padding: 20rpx 0;
            border-radius: 12rpx;
            margin-bottom: 20rpx;
        }

        .popup-cancel {
            text-align: center;
            font-weight: 400;
            font-size: 32rpx;
            color: #979797;
            margin-top: 45rpx;
        }
    }

    .content-wrapper {
        display: flex;
        flex-wrap: wrap;

        background: #FFFFFF;
        border-radius: 35rpx 35rpx 0rpx 0rpx;
        align-items: center;
        position: relative;
        z-index: 2;
        padding: 40rpx 20rpx;
        margin-top: -120rpx;
        margin-bottom: 1rpx;

        .left-content {
            width: 640rpx;
            display: flex;
            align-items: center;
            // justify-content: space-between;

            .avatar {
                width: 126rpx;
                height: 126rpx;
                background: #D0D4D7;
                border-radius: 50%;
                margin-bottom: 10rpx;
                margin-right: 30rpx;
            }
        }

        .content-top {
            display: flex;
            justify-content: space-between;
            align-items: center;

            .left-content {
                width: 520rpx;
                display: flex;
                align-items: center;
                // justify-content: space-between;

                .avatar {
                    width: 130rpx;
                    height: 130rpx;
                    background: #D0D4D7;
                    border-radius: 50%;
                    margin-bottom: 10rpx;
                    margin-right: 30rpx;
                }

                // 已登录用户信息
                .user-info {
                    .username {
                        font-size: 34rpx;
                        color: #333;
                        font-weight: bold;
                        margin-bottom: 8rpx;
                        display: block;
                    }

                    .perfect-info {
                        font-family: Source Han Sans CN;
                        font-weight: 400;
                        font-size: 26rpx;
                        color: #0E1C37;
                        line-height: 26rpx;
                    }
                }

            }

            .follow-btn {
                background: #FFFFFF;
                border-radius: 29rpx;
                border: 1px solid #F76F17;
                padding: 8rpx 28rpx;
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 8rpx;
                font-family: Source Han Sans CN;
                font-weight: 400;
                font-size: 24rpx;
                color: #F76F17;

            }

        }

        // 自我描述 + 标签组
        .desc-tag-group {
            margin-top: 20rpx;

            .self-desc {

                font-size: 26rpx;
                color: #0E1C37;
                line-height: 26rpx;
                display: block;
                margin-bottom: 30rpx;
            }

            .tag-group {
                display: flex;
                align-items: center;
                gap: 20rpx;

                .tag-reputation,
                .tag-rating,
                .tag-verify {
                    display: flex;
                    align-items: center;
                    padding: 10rpx 16rpx;
                    border-radius: 26rpx;
                    font-family: Source Han Sans CN;
                    font-weight: 500;
                    font-size: 26rpx;

                    // 分别给不同标签设置背景色，模拟示例效果
                    &.tag-reputation {
                        background: rgba(247, 111, 23, 0.1);

                        .tag-icon {
                            position: relative;
                            margin-right: 12rpx;

                            image {
                                display: block;
                            }

                            .tag-badge {
                                position: absolute;
                                top: 50%;
                                left: calc(50% - 2rpx);
                                transform: translate(-50%, -50%);
                                font-family: Source Han Sans CN;
                                font-weight: 500;
                                font-size: 22rpx;
                                color: #FFFFFF;
                                text-shadow: 0rpx 1rpx 3rpx rgba(241, 106, 12, 0.67);
                                z-index: 1;
                            }
                        }

                        text {
                            color: #F76F17;
                        }
                    }

                    &.tag-rating {
                        background: rgba(88, 148, 246, 0.1);

                        text {
                            color: #5894F6;
                        }

                        .tag-icon2 {
                            padding: 6rpx 12rpx;
                            background: linear-gradient(100deg, #77ABFF 0%, #4789F3 100%);
                            border-radius: 26rpx;
                            display: flex;
                            justify-content: center;
                            align-items: center;

                            text {

                                font-family: Source Han Sans CN;
                                font-weight: 500;
                                font-size: 22rpx;
                                color: #FFFFFF;
                                text-shadow: 0rpx 1rpx 3rpx rgba(33, 106, 226, 0.67);
                            }

                            margin-right: 12rpx;
                        }


                    }

                    &.tag-verify {
                        background: rgba(14, 28, 55, 0.1);

                        .tag-icon3 {
                            display: flex;
                            align-items: center;
                        }

                        text {
                            color: #888B9A;
                            margin-left: 12rpx;
                        }

                        &.verified {
                            background: rgba(76, 231, 0, 0.1);

                            text {
                                color: #38AB00;
                            }
                        }
                    }
                }
            }
        }

        // 未登录文案
        .login-text {
            font-weight: 500;
            font-size: 36rpx;
            color: #0E1C37;
            line-height: 26rpx;
        }
    }

    // 导航栏
    .nav-bar {

        display: flex;
        align-items: center;
        padding: 0rpx 20rpx;
        height: 106rpx;
        background: #FFFFFF;
        // margin-bottom: 5rpx;


        .nav-btn {
            font-family: Source Han Sans CN;
            font-weight: 400;
            font-size: 26rpx;
            color: #888B9A;
            line-height: 26rpx;
            padding: 10rpx 20rpx;
            border-radius: 20rpx;
            margin-right: 20rpx;
            transition: background-color 0.3s ease;
        }

        .nav-btn.active {
            font-weight: 500;
            font-size: 26rpx;
            color: #0E1C37;
        }
    }

    // 动态列表
    .dynamic-info {
        background-color: #fff;
        padding: 0rpx 37rpx 30rpx 25rpx; // 增大内边距

        margin-bottom: 40rpx;
        box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.03);
        margin-top: 20rpx;

        .dynamic-content {
            display: flex;
            align-items: flex-start;
            padding-bottom: 30rpx;
            padding-top: 30rpx;
            // border-bottom: 1px solid #f8f8f8; // 分割线

            .avatar {
                width: 72rpx;
                height: 72rpx;
                border-radius: 50%;
                margin-right: 22rpx;
                // border: 4rpx solid #fff;
                // box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08); // 头像阴影
            }

            .text-wrap {
                flex: 1;

                .header {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    margin-bottom: 35rpx;

                    .nickname {
                        font-family: Source Han Sans CN;
                        font-weight: 500;
                        font-size: 26rpx;
                        color: #0E1C37;
                        margin-bottom: 0rpx;
                    }

                    .time {
                        font-family: Source Han Sans CN;
                        font-weight: 400;
                        font-size: 22rpx;
                        color: #888B9A;

                    }

                    .delete {
                        font-family: Source Han Sans CN;
                        font-weight: 400;
                        font-size: 22rpx;
                        color: #888B9A;
                    }

                }


                .content-container {
                    position: relative;
                    max-height: 138rpx; // 3行高度
                    overflow: hidden;
                    transition: max-height 0.3s ease;
                    margin-bottom: 29rpx;

                    &.expanded {
                        max-height: none; // 展开时取消限制
                    }

                    .content {
                        font-size: 30rpx;
                        line-height: 46rpx;
                        word-break: break-word;
                        // 恢复三行文本限制
                        // display: -webkit-box;
                        // -webkit-line-clamp: 3;
                        // -webkit-box-orient: vertical;
                        overflow: hidden;
                        text-overflow: ellipsis;
                    }

                    .toggle-btn {
                        position: absolute;
                        right: 0rpx;
                        bottom: 0;
                        background: #fff;
                        padding-left: 8rpx;
                        color: #4789ec;
                        z-index: 10;
                        font-size: 30rpx;
                        height: 46rpx;
                        line-height: 46rpx;
                    }
                }

                // 图片容器
                .dynamic-images {
                    display: flex;
                    flex-wrap: wrap;
                    justify-content: flex-start;
                    gap: 12rpx;
                    /* 图片间距 */
                    margin-bottom: 40rpx;
                    box-sizing: border-box;
                    width: 100%;

                    .dynamic-img {
                        width: calc((100% - 24rpx) / 3);
                        height: 186rpx;
                        border-radius: 16rpx;
                        object-fit: cover;
                        box-sizing: border-box;

                        &.single-img {
                            width: calc((100% - 12rpx) / 1.5) !important;
                            /* 覆盖其他样式 */
                            height: 260rpx;
                            /* 高度自适应 */
                            aspect-ratio: 1.5;
                            /* 保持宽屏比例 */
                            border-radius: 16rpx;
                        }
                    }

                    // 视频容器样式
                    .video-container {
                        position: relative;
                        width: calc((100% - 24rpx) / 3);
                        height: 186rpx;
                        border-radius: 16rpx;
                        overflow: hidden;
                        box-sizing: border-box;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        background-color: #000;

                        .dynamic-video {
                            width: 100%;
                            height: 100%;
                            object-fit: contain;
                            background-color: #000;
                            border-radius: 16rpx;
                            position: relative;
                            top: 50%;
                            left: 50%;
                            transform: translate(-50%, -50%);
                        }

                        &.single-img {
                            width: calc((100% - 12rpx) / 1.5) !important;
                            /* 覆盖其他样式 */
                            height: 260rpx;
                            /* 高度自适应 */
                            aspect-ratio: 1.5;
                            /* 保持宽屏比例 */
                            border-radius: 16rpx;
                        }

                        /* 视频播放按钮样式 */
                        .video-play-btn {
                            position: absolute;
                            top: 50%;
                            left: calc(50% + 10rpx);
                            transform: translate(-50%, -50%);
                            width: 60rpx;
                            height: 76rpx;
                            z-index: 10;
                        }

                        /* 视频时长样式 */
                        .video-duration {
                            position: absolute;
                            bottom: 10rpx;
                            left: 10rpx;
                            font-family: Source Han Sans CN;
                            font-weight: 500;
                            font-size: 22rpx;
                            color: #FFFFFF;
                            line-height: 20rpx;
                            background-color: rgba(0, 0, 0, 0.5);
                            padding: 10rpx 10rpx 5rpx 11rpx;
                            border-radius: 10rpx;
                            z-index: 10;
                        }
                    }

                }


                .info {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    width: 100%;
                    height: 60rpx;

                    .info-item {
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        width: 33.33%;
                        height: 100%;
                        background: none;

                        text {
                            font-family: Source Han Sans CN;
                            font-weight: 400;
                            font-size: 24rpx;
                            color: #A3A6B7;
                            line-height: 41rpx;
                            white-space: nowrap;
                        }

                        .menu-icon {
                            width: 29rpx;
                            height: 28rpx;
                            margin-right: 14rpx;
                        }
                    }

                    .dot {
                        margin: 0 12rpx;
                        color: #ddd;
                    }

                    text {
                        margin-right: 20rpx;
                        color: #666;
                        cursor: pointer;
                        display: flex;
                        align-items: center;

                        &:nth-child(5) {
                            color: #ff6666;
                        }

                        // 点赞图标（可自行替换为 iconfont）
                        &:nth-child(5)::before {
                            content: "♥";
                            margin-right: 6rpx;
                            font-size: 28rpx;
                        }
                    }
                }
            }
        }

        // 评论弹窗优化
        .comment-popup {
            padding: 40rpx 0rpx;
            height: 58vh;
            background: #FFFFFF;
            border-radius: 35rpx 35rpx 0rpx 0rpx;
            position: relative;

            .popup-title {
                font-size: 34rpx;
                font-weight: 700;
                padding: 0 40rpx 20rpx;
                margin-bottom: 20rpx;
                border-bottom: 2rpx solid #f5f5f5;
            }

            .comment-list {
                flex: 1;
                overflow-y: auto;
                padding: 0 40rpx;
                height: calc(60vh - 240rpx);

                .comment-item {
                    margin-bottom: 30rpx;
                    padding-bottom: 30rpx;
                    border-bottom: 1px solid #f8f8f8;

                    .comment-header {
                        display: flex;
                        align-items: center;
                        width: 99%;

                        .comment-avatar {
                            width: 60rpx;
                            height: 60rpx;
                            border-radius: 50%;
                            margin-right: 20rpx;
                            flex-shrink: 0;
                        }

                        .comment-content {
                            display: flex;
                            justify-content: space-between;
                            align-items: center;
                            width: 81%;

                            .comment-header-left {
                                display: flex;
                                flex-direction: column;

                                .comment-nickname {
                                    color: #333;
                                    font-weight: 700;
                                    font-size: 28rpx;
                                }

                                .comment-time {
                                    color: #999;
                                    font-size: 22rpx;
                                }
                            }

                            .comment-actions {
                                display: flex;
                                align-items: center;
                                color: #888;
                                font-size: 24rpx;
                                margin-right: 30rpx; // 添加右侧间距

                                .comment-likesNum {
                                    font-family: Source Han Sans CN;
                                    font-weight: 400;
                                    font-size: 24rpx;
                                    line-height: 41rpx;
                                    margin-right: 8rpx; // 文字与图标间距
                                    transition: color 0.3s ease;

                                    &.liked {
                                        color: #F76F17; // 点赞后文字变红
                                    }

                                    // 未点赞时的样式
                                    &:not(.liked) {
                                        color: #A3A6B7; // 未点赞文字颜色
                                    }
                                }

                                uni-icons {
                                    transition: color 0.3s ease;
                                }
                            }
                        }
                    }

                    .comment-text {
                        color: #333;
                        font-size: 28rpx;
                        line-height: 42rpx;
                        margin-bottom: 15rpx;
                        margin-left: 80rpx; // 与头像对齐
                    }

                    .reply-list {
                        margin-top: 20rpx;
                        margin-left: 80rpx;
                        width: 555rpx;
                        padding: 20rpx;
                        background: #EEF2F3;
                        border-radius: 10rpx;
                        /* 移除固定高度，改为自适应 */
                        height: auto;
                        min-height: 100rpx;


                        .reply-item {
                            margin-bottom: 15rpx;
                            display: flex;
                            align-items: flex-start;
                            /* 顶部对齐，避免文本换行后与头像不对齐 */

                            .replyer {
                                font-family: Source Han Sans CN;
                                font-weight: 500;
                                font-size: 26rpx;
                                color: #0E1C37;
                                margin-right: 10rpx;
                            }

                            .reply-content {
                                font-family: Source Han Sans CN;
                                font-weight: 400;
                                font-size: 26rpx;
                                color: #888B9A;
                                line-height: 40rpx;
                                /* 确保文本自动换行 */
                                white-space: normal;
                                word-wrap: break-word;
                                flex: 1;
                                /* 占用剩余空间 */
                            }
                        }

                        .view-more {
                            font-family: Source Han Sans CN;
                            font-weight: 400;
                            font-size: 22rpx;
                            color: #888B9A;
                            margin-top: 10rpx;
                            padding: 5rpx 0;
                        }
                    }
                }
            }

            .no-comment {
                display: flex;
                flex-direction: column;
                align-items: center;
                text-align: center;
                color: #999;
                margin: 100rpx 0;
                font-size: 28rpx;

                image {
                    width: 200rpx;
                    height: 200rpx;
                    margin-bottom: 30rpx;
                }
            }

            .comment-input-wrap {
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
                display: flex;
                align-items: center;
                justify-content: space-between;
                background: #FFFFFF;
                box-shadow: 0rpx 0rpx 6rpx 0rpx #E2E2E2;
                padding: 20rpx;
                border: none;

                .comment-input {
                    width: 490rpx;
                    height: 76rpx;
                    line-height: 90rpx;
                    border: 2rpx solid #eee;
                    padding: 0 20rpx;
                    font-size: 28rpx;
                    background: #FFFFFF;
                    box-shadow: 0rpx 2rpx 7rpx 0rpx rgba(96, 96, 96, 0.2);
                    border-radius: 16rpx;
                }

                .send-btn {
                    width: 130rpx;
                    height: 60rpx;
                    background: #D0D4D7;
                    border-radius: 10rpx;
                    text-align: center;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    font-size: 26rpx;
                    color: #888B9A;
                    line-height: 58rpx;
                    border: none;
                    margin-right: -1rpx;
                }
            }
        }


        // 举报弹窗优化 - 与index页面保持一致
        .report-popup {
            width: 618rpx;
            height: 605rpx;
            background: #FFFFFF;
            border-radius: 35rpx;
            padding: 40rpx;

            .report-popup-header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 40rpx;

                .popup-title {
                    font-family: Source Han Sans CN;
                    font-weight: bold;
                    font-size: 32rpx;
                    color: #0E1C37;
                }

                .cancel {
                    background: #EEF2F3;
                    border-radius: 10rpx;
                    font-family: Source Han Sans CN;
                    font-weight: 500;
                    font-size: 22rpx;
                    color: #888B9A;
                    padding: 10rpx;
                }
            }

            // 与index页面保持一致的类名和样式
            .report-popup-textarea {
                width: 100%;
                height: 320rpx;
                background: #F8F8F8;
                border-radius: 18rpx;
                border: 2px solid #D0D4D7;
                padding: 29rpx;
                font-size: 28rpx;
                margin-bottom: 40rpx;
                resize: none;
                box-sizing: border-box;
            }

            .report-popup-btn {
                width: 100%;
                height: 90rpx;
                line-height: 90rpx;
                text-align: center;
                border: none;
                border-radius: 12rpx;
                font-size: 32rpx;
                font-weight: 500;
                color: #0E1C37;
                background-color: #BEFF32;
                transition: background-color 0.3s ease;
            }
        }



    }


    .album-list {
        margin-bottom: 140rpx;

        .album-container {
            display: flex;
            flex-direction: row;
            align-items: flex-start;
            margin-top: 30rpx;
            padding: 30rpx 10rpx;
            border-bottom: 1px solid #f5f5f5;
            background: #FFFFFF;
        }

        .album-month {
            width: 100rpx;
            /* 添加固定宽度 */
            margin-right: 25rpx;
            font-family: Source Han Sans CN;
            font-weight: 500;
            font-size: 36rpx;
            color: #0E1C37;
            padding-top: 5rpx;
            flex-shrink: 0;
            /* 确保不被压缩 */
            text-align: right;
            /* 右对齐月份文本，视觉上更平衡 */
        }

        .photo-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-start;
            /* 修改为左对齐排列 */
            flex: 1;


            .photo-item {
                position: relative;
                width: 31%;
                margin-right: 10rpx;
                margin-bottom: 10rpx;
                aspect-ratio: 1;
                overflow: hidden;
                // transition: all 0.2s ease;
                box-sizing: border-box;

                // 添加选中状态边框
                &:nth-child(3n) {
                    margin-right: 10rpx;
                }


                &.selected {
                    // 增强选中边框样式
                    border: 6rpx solid #5894F6;
                    border-radius: 16rpx;
                    // 添加选中状态阴影效果
                    // box-shadow: 0 0 0 2rpx rgba(0, 122, 255, 0.3);
                }

                .photo {
                    width: 100%;
                    height: 100%;
                    border-radius: 16rpx;
                    object-fit: cover;
                }

                // 圆形选择指示器容器
                .select-indicator-container {
                    position: absolute;
                    top: 10rpx;
                    right: 10rpx;
                    width: 36rpx;
                    height: 36rpx;
                    border-radius: 50%;
                    background-color: transparent;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    transition: all 0.2s ease;
                }

                // 勾选图标
                .photo-select-icon {
                    position: absolute;
                    top: 14rpx;
                    right: 14rpx;
                    color: white;
                }
            }

            /* 视频容器样式 */
            .video-container {
                position: relative;
                width: 100%;
                height: 100%;
                border-radius: 16rpx;
                overflow: hidden;
                display: flex;
                align-items: center;
                justify-content: center;
                background-color: #000;
            }

            /* 视频播放按钮样式 */
            .video-play-btn {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                z-index: 10;
            }

            /* 视频时长样式 */
            .video-duration {
                position: absolute;
                bottom: 10rpx;
                left: 10rpx;
                font-family: Source Han Sans CN;
                font-weight: 500;
                font-size: 22rpx;
                color: #FFFFFF;
                line-height: 20rpx;
                background-color: rgba(0, 0, 0, 0.5);
                padding: 4rpx 8rpx;
                border-radius: 4rpx;
                z-index: 10;
            }
        }

        .bottom-bar {
            display: flex;
            justify-content: space-around;
            padding: 20rpx 52rpx 39rpx 52rpx;
            background-color: #fff;
            position: fixed;
            bottom: 0rpx;
            left: 0;
            right: 0;
            z-index: 1000;



            .action-btn {
                display: flex;
                justify-content: center;
                align-items: center;
                width: 244rpx;
                height: 83rpx;
                background: #D0D4D7;
                border-radius: 12rpx;
                font-family: Source Han Sans CN;
                font-weight: 500;
                font-size: 32rpx;
                color: #0E1C37;
                border: none;
                padding: 10rpx 20rpx;
                margin-right: 20rpx;
            }

            .delete-btn {
                display: flex;
                justify-content: center;
                align-items: center;
                width: 382rpx;
                height: 83rpx;
                background: #BEFF32;
                border-radius: 12rpx;
                font-family: Source Han Sans CN;
                font-weight: 500;
                font-size: 32rpx;
                color: #0E1C37;
                border: none;
                padding: 10rpx 20rpx;
            }
        }
    }

    .delete-popup {
        width: 484rpx;
        height: 250rpx;
        background: #FFFFFF;
        border-radius: 26rpx;
        // padding: 30rpx;


        .delete-message {
            width: 300rpx;
            height: 65rpx;
            text-align: center;
            margin: 30rpx auto;
            font-family: Source Han Sans CN;
            font-weight: 500;
            font-size: 30rpx;
            color: #000000;
            padding-top: 40rpx;
            padding-bottom: 10rpx;

        }

        .delete-buttons {
            display: flex;
            justify-content: space-around;
            margin-top: 50rpx;
            border-top: 1rpx solid #CDCDCD;
            font-family: Source Han Sans CN;
            font-weight: 500;
            font-size: 32rpx;
            color: #2E66F7;


            .cancel-btn {
                flex: 1;
                width: 224px;
                height: 80rpx;
                display: flex;
                justify-content: center;
                align-items: center;

                border-right: 1rpx solid #CDCDCD;
            }

            .confirm-btn {
                flex: 1;
                width: 224rpx;
                height: 80rpx;
                display: flex;
                justify-content: center;
                align-items: center;


            }
        }
    }
}